package com.yonyou.cyxdms.sysAuth.service.controller.manage.vehicleProduct;

import com.yonyou.cyx.framework.controller.base.BaseController;
import com.yonyou.cyxdms.sysAuth.service.service.vehicleProduct.DealerbrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author     ：quankk
 * @date       ：2019/7/19 17:12
 * @description：简要描述：经销商信息管理
 */
@Api(value = "简要描述：经销商信息管理", tags = {"简要描述：经销商信息管理"})
@RestController
@RequestMapping("/dealerGroup")
public class DealerBasicController extends BaseController {

    // 定义日志接口
    private static final Logger logger = LoggerFactory.getLogger(DealerBasicController.class);

    @Autowired
    private DealerbrandService dealerbrandService;


    /**
     * @author     ：quankk
     * @date       ：2019/7/19 17:14
     * @description：经销商下拉框的方法
     */
    @RequestMapping(value="/dealer", method = RequestMethod.GET)
    @ApiOperation(value = "经销商下拉框的方法")
    @ApiImplicitParams({@ApiImplicitParam(value = "用户id", name = "userId", required = true, dataType = "string", paramType = "header")})
    public List<Map> dealerSelect(@RequestParam Map<String,String> queryParam) {
        return dealerbrandService.queryDealer(queryParam);
    }


    /**
     * 获取维修站简称
     *
     * @param
     * @return java.util.List<java.util.Map   <   java.lang.String   ,   java.lang.Object>>
     * @author dengqiang
     * @since 2019/8/19
     */
    @GetMapping(value = "/queryDealerShortname")
    public List<Map<String, Object>> queryDealerShortname() {
        return dealerbrandService.queryDealerShortname();
    }

}
